﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.Triggers.CCoCreateTriggerCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System.Resources;
using System.Windows.Forms;
using Tecnomatix.Engineering;
using Tecnomatix.Engineering.Ui;


namespace DnProcessSimulateCommands.Triggers;

public class CCoCreateTriggerCmd : TxButtonCommand
{
  protected bool m_dialogIsOpen;
  private CApCreateTriggerEnabler m_commandEnabler = new CApCreateTriggerEnabler();

  public CCoCreateTriggerCmd() => this.m_dialogIsOpen = false;

  public virtual void Execute(object cmdParams)
  {
    if (this.m_dialogIsOpen)
      return;
    ((Control) new CUiCreateTriggerDlg(this, TriggerAction.CreateTrigger)).Show();
  }

  public virtual bool Connect() => true;

  public virtual bool Licensed => TxCommandLicenser.CreateTriggerLicense;

  public void DialogIsOpen(bool dialogIsOpen) => this.m_dialogIsOpen = dialogIsOpen;

  public virtual string Category
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.Triggers.StringTable", ((object) this).GetType().Assembly).GetString("CMD_CATEGORY");
    }
  }

  public virtual string Tooltip
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.Triggers.StringTable", ((object) this).GetType().Assembly).GetString("CMD_TOOLTIP");
    }
  }

  public virtual string Description
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.Triggers.StringTable", ((object) this).GetType().Assembly).GetString("CMD_DESCRIPTION");
    }
  }

  public virtual string Name
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.Triggers.StringTable", ((object) this).GetType().Assembly).GetString("CMD_NAME");
    }
  }

  public virtual string Bitmap
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.Triggers.StringTable", ((object) this).GetType().Assembly).GetString("CREATE_PAINT_TRIGGER_BMP");
    }
  }

  public virtual ITxCommandEnabler CommandEnabler => (ITxCommandEnabler) this.m_commandEnabler;

  public virtual ITxImage Image => (ITxImage) TxImageManager.GetImageByKey("CreatePaintTrigger");
}
